package com.itheima.zuoye.zy3;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class Test {
    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException, ClassNotFoundException {
        Class<?> clazz = Class.forName("com.itheima.zuoye.zy3.DemoClass");
        Constructor<?> constructor = clazz.getConstructor();
        Object o = constructor.newInstance();
        ((DemoClass)o).run();



    }
}
